package br.edu.ifpr.GravityDodger;

import org.andengine.entity.scene.menu.MenuScene;
import org.andengine.entity.scene.menu.MenuScene.IOnMenuItemClickListener;
import org.andengine.entity.scene.menu.item.IMenuItem;
import org.andengine.entity.scene.menu.item.SpriteMenuItem;
import org.andengine.entity.sprite.Sprite;

public class MainMenuScene extends MenuScene implements IOnMenuItemClickListener {

	GravityDogerActivity activity;
	final int MENU_START = 0;
	final int MENU_ABOUT = 1;

	public MainMenuScene() {
		
		super(GravityDogerActivity.getSharedInstance().mCamera );
		activity = GravityDogerActivity.getSharedInstance();
		Sprite background = new Sprite(0, 0, activity.mTextures.get(0),
				activity.getVertexBufferObjectManager());

		/*Sprite teste = new Sprite(250, 250, activity.mTextures.get(1),
				activity.getVertexBufferObjectManager());
		attachChild(teste);*/


		IMenuItem startButtom = new SpriteMenuItem(MENU_START, activity.mTextures.get(GravityDogerActivity.TextureMenuStart),
				activity.getVertexBufferObjectManager());
		
		startButtom.setPosition(550, 250);
		IMenuItem aboutButtom = new SpriteMenuItem(MENU_ABOUT, activity.mTextures.get(GravityDogerActivity.TextureMenuAbout),
				activity.getVertexBufferObjectManager());
		aboutButtom.setPosition(550, 350);
		
		setOnMenuItemClickListener(this);
		
		this.attachChild(background);
		addMenuItem(startButtom);
		addMenuItem(aboutButtom);
	
	}

	public boolean onMenuItemClicked(MenuScene arg0, IMenuItem arg1,
			float arg2, float arg3) {
		// TODO Auto-generated method stub
		return false;
	}
}
